<template>
  <el-container>
    <el-aside width="240px">
      <div id="logo">
        机床数据采集
      </div>
      <el-menu :default-openeds="['/realTime']" default-active="1" router>
        <el-menu-item index="/equipmentStatus">
          设备状态
        </el-menu-item>
        <el-menu-item index="/realTime">
          实时
        </el-menu-item>
        <el-menu-item index="/productStatus">
          生产状态
        </el-menu-item>
        <el-menu-item index="/machineList">
          机床列表
        </el-menu-item>
      </el-menu>
    </el-aside>
    <div id="main">
      <div id="header">
        <span class="name">张三</span>
      </div>
      <div id="content">
        <nuxt />
      </div>
    </div>
  </el-container>
</template>

<style lang="less">
@import url('../assets/styles/common.less');
#logo {
  height: 60px;
  color: #fff;
  background: #1e2832;
  text-align: center;
  line-height: 60px;
}
.el-aside {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: #2d3741;
}
#main {
  position: absolute;
  top: 0;
  left: 240px;
  right: 0;
  bottom: 0;
  background: #ffffff;
}
#header {
  height: 60px;
  background: #232d37;
  text-align: right;
  padding-right: 20px;
  .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 10px 10px 0 0;
  }
  .name {
    font-size: 16px;
    color: #ffffff;
    transform: translateY(-30px);
    display: inline-block;
  }
}
#content {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  overflow-y: auto;
}

</style>
